/**
* Content of the revision we are working on
* @var Content
- * @since 1.WD
+ * @since 1.21
*/
var $mContentObject; // !<
* This function has side effects! Do not use this function if you
* only want the real revision text if any.
*
- * @deprecated in 1.WD; use getContentObject() instead
+ * @deprecated in 1.21; use getContentObject() instead
*
* @return string Return the text of this revision
*/
public function getContent() {
- wfDeprecated( __METHOD__, '1.WD' );
+ wfDeprecated( __METHOD__, '1.21' );
$content = $this->getContentObject();
return ContentHandler::getContentText( $content );
}
*
* @return Content Return the content of this revision
*
- * @since 1.WD
+ * @since 1.21
*
* @todo: FIXME: this should really be protected, all callers should be changed to use WikiPage::getContent() instead.
*/
* uses this method to retrieve page text from the database, so the function has to remain public for now.
*
* @return mixed string containing article contents, or false if null
- * @deprecated in 1.WD, use WikiPage::getContent() instead
+ * @deprecated in 1.21, use WikiPage::getContent() instead
*/
function fetchContent() { #BC cruft!
- wfDeprecated( __METHOD__, '1.WD' );
+ wfDeprecated( __METHOD__, '1.21' );
if ( $this->mContentLoaded && $this->mContent ) {
return $this->mContent;
*
* @return Content|null
*
- * @since 1.WD
+ * @since 1.21
*/
protected function fetchContentObject() {
if ( $this->mContentLoaded ) {
* @param $newtext
* @param $flags
* @return string
- * @deprecated since 1.WD, use ContentHandler::getAutosummary() instead
+ * @deprecated since 1.21, use ContentHandler::getAutosummary() instead
*/
public static function getAutosummary( $oldtext, $newtext, $flags ) {
return WikiPage::getAutosummary( $oldtext, $newtext, $flags );
* @param $def_text string
* @return mixed string on success, $def_text for invalid sections
* @private
- * @deprecated since 1.WD
+ * @deprecated since 1.21
* @todo: deprecated, replace usage everywhere
*/
function getContent( $def_text = false ) {
- wfDeprecated( __METHOD__, '1.WD' );
+ wfDeprecated( __METHOD__, '1.21' );
if ( $def_text !== null && $def_text !== false && $def_text !== '' ) {
$def_content = $this->toEditContent( $def_text );
* WikiPage::getContent( Revision::RAW ) except that when the page doesn't exist an empty
* content object is returned instead of null.
*
- * @since 1.WD
+ * @since 1.21
* @return string
*/
private function getCurrentContent() {
* Use this method before edit() to preload some text into the edit box
*
* @param $text string
- * @deprecated since 1.WD
+ * @deprecated since 1.21
*/
public function setPreloadedText( $text ) {
- wfDeprecated( __METHOD__, "1.WD" );
+ wfDeprecated( __METHOD__, "1.21" );
$content = $this->toEditContent( $text );
*
* @param $content Content
*
- * @since 1.WD
+ * @since 1.21
*/
public function setPreloadedContent( Content $content ) {
$this->mPreloadedContent = $content;
*
* @return String
*
- * @deprecated since 1.WD, use getPreloadedContent() instead
+ * @deprecated since 1.21, use getPreloadedContent() instead
*/
protected function getPreloadedText( $preload ) { #NOTE: B/C only, replace usage!
- wfDeprecated( __METHOD__, "1.WD" );
+ wfDeprecated( __METHOD__, "1.21" );
$content = $this->getPreloadedContent( $preload );
$text = $this->toEditText( $content );
*
* @return Content
*
- * @since 1.WD
+ * @since 1.21
*/
protected function getPreloadedContent( $preload ) { #@todo: use this!
global $wgUser;
* @param $editText string
*
* @return bool
- * @deprecated since 1.WD, use mergeChangesIntoContent() instead
+ * @deprecated since 1.21, use mergeChangesIntoContent() instead
*/
function mergeChangesInto( &$editText ){
- wfDebug( __METHOD__, "1.WD" );
+ wfDebug( __METHOD__, "1.21" );
$editContent = $this->toEditContent( $editText );
* @parma $editText string
*
* @return bool
- * @since since 1.WD
+ * @since since 1.21
*/
private function mergeChangesIntoContent( &$editContent ){
wfProfileIn( __METHOD__ );
/**
* @return string
*
- * @deprecated Since 1.WD, use getContent() instead.
+ * @deprecated Since 1.21, use getContent() instead.
*/
function getText() {
wfDeprecated( "Use getContent() instead." );
* @param $user User object to check for, only if FOR_THIS_USER is passed
* to the $audience parameter
*
- * @deprecated in 1.WD, use getContent() instead
+ * @deprecated in 1.21, use getContent() instead
* @todo: replace usage in core
* @return String
*/
public function getText( $audience = self::FOR_PUBLIC, User $user = null ) {
- wfDeprecated( __METHOD__, '1.WD' );
+ wfDeprecated( __METHOD__, '1.21' );
$content = $this->getContent( $audience, $user );
return ContentHandler::getContentText( $content ); # returns the raw content text, if applicable
* Revision::RAW get the text regardless of permissions
* @param $user User object to check for, only if FOR_THIS_USER is passed
* to the $audience parameter
- * @since 1.WD
+ * @since 1.21
* @return Content
*/
public function getContent( $audience = self::FOR_PUBLIC, User $user = null ) {
*
* @return String
*
- * @deprecated since 1.WD. Instead, use Revision::getContent( Revision::RAW )
+ * @deprecated since 1.21. Instead, use Revision::getContent( Revision::RAW )
* or Revision::getSerializedData() as appropriate.
*/
public function getRawText() {
- wfDeprecated( __METHOD__, "1.WD" );
+ wfDeprecated( __METHOD__, "1.21" );
return $this->getText( self::RAW );
}
/**
* Fetch original serialized data without regard for view restrictions
*
- * @since 1.WD
+ * @since 1.21
* @return String
*/
public function getSerializedData() {
/**
* Gets the content object for the revision
*
- * @since 1.WD
+ * @since 1.21
* @return Content
*/
protected function getContentInternal() {
*
* @param $text String: Text with possible redirect
* @return Title: The corresponding Title
- * @deprecated since 1.WD, use Content::getRedirectTarget instead.
+ * @deprecated since 1.21, use Content::getRedirectTarget instead.
*/
public static function newFromRedirect( $text ) {
$content = ContentHandler::makeContent( $text, null, CONTENT_MODEL_WIKITEXT );
*
* @param $text String Text with possible redirect
* @return Title
- * @deprecated since 1.WD, use Content::getUltimateRedirectTarget instead.
+ * @deprecated since 1.21, use Content::getUltimateRedirectTarget instead.
*/
public static function newFromRedirectRecurse( $text ) {
$content = ContentHandler::makeContent( $text, null, CONTENT_MODEL_WIKITEXT );
*
* @param $text String Text with possible redirect
* @return Array of Titles, with the destination last
- * @deprecated since 1.WD, use Content::getRedirectChain instead.
+ * @deprecated since 1.21, use Content::getRedirectChain instead.
*/
public static function newFromRedirectArray( $text ) {
$content = ContentHandler::makeContent( $text, null, CONTENT_MODEL_WIKITEXT );
*
* @return ContentHandler
*
- * @since 1.WD
+ * @since 1.21
*/
public function getContentHandler() {
return ContentHandler::getForModelID( $this->getContentModel() );
*
* @return String
*
- * @since 1.WD
+ * @since 1.21
*/
public function getContentModel() {
if ( $this->exists() ) {
* Revision::RAW get the text regardless of permissions
* @return Content|null The content of the current revision
*
- * @since 1.WD
+ * @since 1.21
*/
public function getContent( $audience = Revision::FOR_PUBLIC ) {
$this->loadLastEdit();
* Revision::FOR_THIS_USER to be displayed to $wgUser
* Revision::RAW get the text regardless of permissions
* @return String|false The text of the current revision
- * @deprecated as of 1.WD, getContent() should be used instead.
+ * @deprecated as of 1.21, getContent() should be used instead.
*/
public function getText( $audience = Revision::FOR_PUBLIC ) { #@todo: deprecated, replace usage!
- wfDeprecated( __METHOD__, '1.WD' );
+ wfDeprecated( __METHOD__, '1.21' );
$this->loadLastEdit();
if ( $this->mLastRevision ) {
* Get the text of the current revision. No side-effects...
*
* @return String|bool The text of the current revision. False on failure
- * @deprecated as of 1.WD, getContent() should be used instead.
+ * @deprecated as of 1.21, getContent() should be used instead.
*/
public function getRawText() {
- wfDeprecated( __METHOD__, '1.WD' );
+ wfDeprecated( __METHOD__, '1.21' );
return $this->getText( Revision::RAW );
}
* @param $undo Revision
* @param $undoafter Revision Must be an earlier revision than $undo
* @return mixed string on success, false on failure
- * @since 1.WD
+ * @since 1.21
* Before we had the Content object, this was done in getUndoText
*/
public function getUndoContent( Revision $undo, Revision $undoafter = null ) {
* @param $undo Revision
* @param $undoafter Revision Must be an earlier revision than $undo
* @return mixed string on success, false on failure
- * @deprecated since 1.WD: use ContentHandler::getUndoContent() instead.
+ * @deprecated since 1.21: use ContentHandler::getUndoContent() instead.
*/
public function getUndoText( Revision $undo, Revision $undoafter = null ) {
- wfDeprecated( __METHOD__, '1.WD' );
+ wfDeprecated( __METHOD__, '1.21' );
$this->loadLastEdit();
* @param $edittime String: revision timestamp or null to use the current revision
* @return String new complete article text, or null if error
*
- * @deprecated since 1.WD, use replaceSectionContent() instead
+ * @deprecated since 1.21, use replaceSectionContent() instead
*/
public function replaceSection( $section, $text, $sectionTitle = '', $edittime = null ) {
- wfDeprecated( __METHOD__, '1.WD' );
+ wfDeprecated( __METHOD__, '1.21' );
if ( strval( $section ) == '' ) { //NOTE: keep condition in sync with condition in replaceSectionContent!
// Whole-page edit; let the whole text through
*
* @return Content new complete article content, or null if error
*
- * @since 1.WD
+ * @since 1.21
*/
public function replaceSectionContent( $section, Content $sectionContent, $sectionTitle = '', $edittime = null ) {
wfProfileIn( __METHOD__ );
*
* Compatibility note: this function previously returned a boolean value indicating success/failure
*
- * @deprecated since 1.WD: use doEditContent() instead.
+ * @deprecated since 1.21: use doEditContent() instead.
*/
public function doEdit( $text, $summary, $flags = 0, $baseRevId = false, $user = null ) {
- wfDeprecated( __METHOD__, '1.WD' );
+ wfDeprecated( __METHOD__, '1.21' );
$content = ContentHandler::makeContent( $text, $this->getTitle() );
* new: Boolean indicating if the function attempted to create a new article
* revision: The revision object for the inserted revision, or null
*
- * @since 1.WD
+ * @since 1.21
*/
public function doEditContent( Content $content, $summary, $flags = 0, $baseRevId = false,
User $user = null, $serialisation_format = null ) {
* Prepare text which is about to be saved.
* Returns a stdclass with source, pst and output members
*
- * @deprecated in 1.WD: use prepareContentForEdit instead.
+ * @deprecated in 1.21: use prepareContentForEdit instead.
*/
public function prepareTextForEdit( $text, $revid = null, User $user = null ) {
- wfDeprecated( __METHOD__, '1.WD' );
+ wfDeprecated( __METHOD__, '1.21' );
$content = ContentHandler::makeContent( $text, $this->getTitle() );
return $this->prepareContentForEdit( $content, $revid , $user );
}
*
* @return bool|object
*
- * @since 1.WD
+ * @since 1.21
*/
public function prepareContentForEdit( Content $content, $revid = null, User $user = null, $serialization_format = null ) {
global $wgParser, $wgContLang, $wgUser;
* @param $comment String: comment submitted
* @param $minor Boolean: whereas it's a minor modification
*
- * @deprecated since 1.WD, use doEditContent() instead.
+ * @deprecated since 1.21, use doEditContent() instead.
*/
public function doQuickEdit( $text, User $user, $comment = '', $minor = 0 ) {
- wfDeprecated( __METHOD__, "1.WD" );
+ wfDeprecated( __METHOD__, "1.21" );
$content = ContentHandler::makeContent( $text, $this->getTitle() );
return $this->doQuickEditContent( $content, $user, $comment , $minor );
* @param $flags Int bitmask: a bitmask of flags submitted for the edit.
* @return string An appropriate autosummary, or an empty string.
*
- * @deprecated since 1.WD, use ContentHandler::getAutosummary() instead
+ * @deprecated since 1.21, use ContentHandler::getAutosummary() instead
*/
public static function getAutosummary( $oldtext, $newtext, $flags ) {
# NOTE: stub for backwards-compatibility. assumes the given text is wikitext. will break horribly if it isn't.
- wfDeprecated( __METHOD__, '1.WD' );
+ wfDeprecated( __METHOD__, '1.21' );
$handler = ContentHandler::getForModelID( CONTENT_MODEL_WIKITEXT );
$oldContent = is_null( $oldtext ) ? null : $handler->unserializeContent( $oldtext );
* A content object represents page content, e.g. the text to show on a page.
* Content objects have no knowledge about how they relate to Wiki pages.
*
- * @since 1.WD
+ * @since 1.21
*/
abstract class AbstractContent implements Content {
* @return Array. A list of DataUpdate objects for putting information
* about this content object somewhere.
*
- * @since WD.1
+ * @since 1.21
*/
public function getSecondaryDataUpdates( Title $title,
Content $old = null,
/**
* @see Content::isRedirect()
*
- * @since WD.1
+ * @since 1.21
*
* @return bool
*/
*
* This default implementation always returns $this.
*
- * @since WD.1
+ * @since 1.21
*
* @return Content $this
*/
/**
* @see Content::getDeletionUpdates()
*
- * @since WD.1
+ * @since 1.21
*
* @param $page \WikiPage the deleted page
* @param $parserOutput null|\ParserOutput optional parser output object
* A content object represents page content, e.g. the text to show on a page.
* Content objects have no knowledge about how they relate to wiki pages.
*
- * @since 1.WD
+ * @since 1.21
*/
interface Content {
/**
- * @since WD.1
+ * @since 1.21
*
* @return string A string representing the content in a way useful for
* building a full text search index. If no useful representation exists,
public function getTextForSearchIndex( );
/**
- * @since WD.1
+ * @since 1.21
*
* @return string The wikitext to include when another page includes this
* content, or false if the content is not includable in a wikitext page.
* Returns a textual representation of the content suitable for use in edit
* summaries and log messages.
*
- * @since WD.1
+ * @since 1.21
*
* @param $maxlength int Maximum length of the summary text
* @return The summary text
* Returns native representation of the data. Interpretation depends on
* the data model used, as given by getDataModel().
*
- * @since WD.1
+ * @since 1.21
*
* @return mixed The native representation of the content. Could be a
* string, a nested array structure, an object, a binary blob...
* Returns the ID of the content model used by this Content object.
* Corresponds to the CONTENT_MODEL_XXX constants.
*
- * @since WD.1
+ * @since 1.21
*
* @return String The model id
*/
*
* Shorthand for ContentHandler::getForContent( $this )
*
- * @since WD.1
+ * @since 1.21
*
* @return ContentHandler
*/
*
* Shorthand for $this->getContentHandler()->getDefaultFormat()
*
- * @since WD.1
+ * @since 1.21
*
* @return String
*/
*
* Shorthand for $this->getContentHandler()->getSupportedFormats()
*
- * @since WD.1
+ * @since 1.21
*
* @return Array of supported serialization formats
*/
*
* Shorthand for $this->getContentHandler()->isSupportedFormat( $format )
*
- * @since WD.1
+ * @since 1.21
*
* @param $format string The format to check
* @return bool Whether the format is supported
*
* Shorthand for $this->getContentHandler()->serializeContent( $this, $format )
*
- * @since WD.1
+ * @since 1.21
*
* @param $format null|string The desired serialization format (or null for
* the default format).
/**
* Returns true if this Content object represents empty content.
*
- * @since WD.1
+ * @since 1.21
*
* @return bool Whether this Content object is empty
*/
*
* This default implementation always returns true.
*
- * @since WD.1
+ * @since 1.21
*
* @return boolean
*/
* - $a->equals( $b ) <=> $b->equals( $a )
* - $a->equals( $b ) && $b->equals( $c ) ==> $a->equals( $c )
*
- * @since WD.1
+ * @since 1.21
*
* @param $that Content The Content object to compare to
* @return bool True if this Content object is equal to $that, false otherwise.
* should return $this. That is, $copy === $original may be true, but only
* for immutable content objects.
*
- * @since WD.1
+ * @since 1.21
*
* @return Content. A copy of this object
*/
* that it's also in a countable location (e.g. a current revision in the
* main namespace).
*
- * @since WD.1
+ * @since 1.21
*
* @param $hasLinks Bool: If it is known whether this content contains
* links, provide this information here, to avoid redundant parsing to
* the result of calling getText() on the ParserOutput object returned by
* this method is undefined.
*
- * @since WD.1
+ * @since 1.21
*
* @return ParserOutput
*/
* @return Array. A list of DataUpdate objects for putting information
* about this content object somewhere.
*
- * @since WD.1
+ * @since 1.21
*/
public function getSecondaryDataUpdates( Title $title,
Content $old = null,
* The last element in the array is the final destination after all redirects
* have been resolved (up to $wgMaxRedirects times).
*
- * @since WD.1
+ * @since 1.21
*
* @return Array of Titles, with the destination last
*/
* This will only return the immediate redirect target, useful for
* the redirect table and other checks that don't need full recursion.
*
- * @since WD.1
+ * @since 1.21
*
* @return Title: The corresponding Title
*/
* There is usually no need to override the default behaviour, subclasses that
* want to implement redirects should override getRedirectTarget().
*
- * @since WD.1
+ * @since 1.21
*
* @return Title
*/
* Returns whether this Content represents a redirect.
* Shorthand for getRedirectTarget() !== null.
*
- * @since WD.1
+ * @since 1.21
*
* @return bool
*/
* If this Content object is a redirect, this method updates the redirect target.
* Otherwise, it does nothing.
*
- * @since WD.1
+ * @since 1.21
*
* @param Title $target the new redirect target
*
/**
* Returns the section with the given ID.
*
- * @since WD.1
+ * @since 1.21
*
* @param $sectionId string The section's ID, given as a numeric string.
* The ID "0" retrieves the section before the first heading, "1" the
* Replaces a section of the content and returns a Content object with the
* section replaced.
*
- * @since WD.1
+ * @since 1.21
*
* @param $section Empty/null/false or a section number (0, 1, 2, T1, T2...), or "new"
* @param $with Content: new content of the section
* Returns a Content object with pre-save transformations applied (or this
* object if no transformations apply).
*
- * @since WD.1
+ * @since 1.21
*
* @param $title Title
* @param $user User
* prepended, if supported. The default implementation just returns this
* Content object unmodified, ignoring the section header.
*
- * @since WD.1
+ * @since 1.21
*
* @param $header string
* @return Content
* Returns a Content object with preload transformations applied (or this
* object if no transformations apply).
*
- * @since WD.1
+ * @since 1.21
*
* @param $title Title
* @param $popts null|ParserOptions
* The necessary updates may be taken from the Content object, or depend on
* the current state of the database.
*
- * @since WD.1
+ * @since 1.21
*
* @param $page \WikiPage the deleted page
* @param $parserOutput null|\ParserOutput optional parser output object
* type), but wikitext content may be represented by a DOM or AST structure in
* the future.
*
- * @since 1.WD
+ * @since 1.21
*/
abstract class ContentHandler {
* TextContent object, this method returns null.
* - otherwise, the behaviour is undefined.
*
- * @since WD.1
- * @deprecated since WD.1. Always try to use the content object.
+ * @since 1.21
+ * @deprecated since 1.21. Always try to use the content object.
*
* @static
* @param $content Content|null
* by $modelId (or, if that is not given, $title->getContentModel()) using
* the given format.
*
- * @since WD.1
+ * @since 1.21
*
* @static
*
*
* Note: this is used by, and may thus not use, Title::getContentModel()
*
- * @since WD.1
+ * @since 1.21
*
* @static
* @param $title Title
/**
* Returns the appropriate ContentHandler singleton for the given title.
*
- * @since WD.1
+ * @since 1.21
*
* @static
* @param $title Title
* Returns the appropriate ContentHandler singleton for the given Content
* object.
*
- * @since WD.1
+ * @since 1.21
*
* @static
* @param $content Content
* ContentHandler may be provided by the ContentHandlerForModelID hook.
* If no ContentHandler can be determined, an MWException is raised.
*
- * @since WD.1
+ * @since 1.21
*
* @static
* @param $modelId String The ID of the content model for which to get a
/**
* Serializes a Content object of the type supported by this ContentHandler.
*
- * @since WD.1
+ * @since 1.21
*
* @abstract
* @param $content Content The Content object to serialize
/**
* Unserializes a Content object of the type supported by this ContentHandler.
*
- * @since WD.1
+ * @since 1.21
*
* @abstract
* @param $blob string serialized form of the content
* Creates an empty Content object of the type supported by this
* ContentHandler.
*
- * @since WD.1
+ * @since 1.21
*
* @return Content
*/
* Returns the model id that identifies the content model this
* ContentHandler can handle. Use with the CONTENT_MODEL_XXX constants.
*
- * @since WD.1
+ * @since 1.21
*
* @return String The model ID
*/
* Throws an MWException if $model_id is not the ID of the content model
* supported by this ContentHandler.
*
- * @since WD.1
+ * @since 1.21
*
* @param String $model_id The model to check
*
* serializeContent() and unserializeContent() methods of this
* ContentHandler.
*
- * @since WD.1
+ * @since 1.21
*
* @return array of serialization formats as MIME type like strings
*/
* This default implementation will return the first element of the array
* of formats that was passed to the constructor.
*
- * @since WD.1
+ * @since 1.21
*
* @return string the name of the default serialization format as a MIME type
*/
* Note that if $format is null, this method always returns true, because
* null means "use the default format".
*
- * @since WD.1
+ * @since 1.21
*
* @param $format string the serialization format to check
* @return bool
* (and only when) $wgActions[$action] === true. This allows subclasses
* to override the default action handlers.
*
- * @since WD.1
+ * @since 1.21
*
* @return Array
*/
/**
* Factory for creating an appropriate DifferenceEngine for this content model.
*
- * @since WD.1
+ * @since 1.21
*
* @param $context IContextSource context to use, anything else will be
* ignored
* Also note that the page language may or may not depend on the actual content of the page,
* that is, this method may load the content in order to determine the language.
*
- * @since 1.WD
+ * @since 1.21
*
* @param Title $title the page to determine the language for.
* @param Content|null $content the page's content, if you have it handy, to avoid reloading it.
* Also note that the page language may or may not depend on the actual content of the page,
* that is, this method may load the content in order to determine the language.
*
- * @since 1.WD
+ * @since 1.21
*
* @param Title $title the page to determine the language for.
* @param Content|null $content the page's content, if you have it handy, to avoid reloading it.
/**
* Returns the name of the diff engine to use.
*
- * @since WD.1
+ * @since 1.21
*
* @return string
*/
*
* This default implementation always returns false.
*
- * @since WD.1
+ * @since 1.21
*
* @param $oldContent Content|string String
* @param $myContent Content|string String
/**
* Return an applicable auto-summary if one exists for the given edit.
*
- * @since WD.1
+ * @since 1.21
*
* @param $oldContent Content|null: the previous text of the page.
* @param $newContent Content|null: The submitted text of the page.
/**
* Auto-generates a deletion reason
*
- * @since WD.1
+ * @since 1.21
*
* @param $title Title: the page's title
* @param &$hasHistory Boolean: whether the page has a history
* between $undo and $undoafter. Revisions must belong to the same page,
* must exist and must not be deleted.
*
- * @since WD.1
+ * @since 1.21
*
* @param $current Revision The current text
* @param $undo Revision The revision to undo
* Returns true for content models that support caching using the
* ParserCache mechanism. See WikiPage::isParserCacheUser().
*
- * @since WD.1
+ * @since 1.21
*
* @return bool
*/
}
/**
- * @since WD.1
+ * @since 1.21
*/
abstract class TextContentHandler extends ContentHandler {
}
/**
- * @since WD.1
+ * @since 1.21
*/
class WikitextContentHandler extends TextContentHandler {
# XXX: make ScriptContentHandler base class, do highlighting stuff there?
/**
- * @since WD.1
+ * @since 1.21
*/
class JavaScriptContentHandler extends TextContentHandler {
}
/**
- * @since WD.1
+ * @since 1.21
*/
class CssContentHandler extends TextContentHandler {
<?php
/**
- * @since WD.1
+ * @since 1.21
*/
class CssContent extends TextContent {
public function __construct( $text ) {
<?php
/**
- * @since WD.1
+ * @since 1.21
*/
class JavaScriptContent extends TextContent {
public function __construct( $text ) {
* to represent content from the MediaWiki namespace, and that there is no MessageContentHandler. MessageContent
* is just intended as glue for wrapping a message programatically.
*
- * @since WD.1
+ * @since 1.21
*/
class MessageContent extends AbstractContent {
*
* TextContent instances are immutable
*
- * @since WD.1
+ * @since 1.21
*/
abstract class TextContent extends AbstractContent {
/**
* Diff this content object with another content object..
*
- * @since WD.diff
+ * @since 1.21diff
*
* @param $that Content the other content object to compare this content object to
* @param $lang Language the language object to use for text segmentation.
<?php
/**
- * @since WD.1
+ * @since 1.21
*/
class WikitextContent extends TextContent {
* This implementation replaces the first link on the page with the given new target
* if this Content object is a redirect. Otherwise, this method returns $this.
*
- * @since WD.1
+ * @since 1.21
*
* @param Title $target
*
* Returns a ParserOutput object resulting from parsing the content's text
* using $wgParser.
*
- * @since WD.1
+ * @since 1.21
*
* @param $content Content the content to render
* @param $title \Title
* @param $old Content: old content
* @param $new Content: new content
*
- * @since 1.WD
+ * @since 1.21
*/
function generateContentDiffBody( Content $old, Content $new ) {
if ( !( $old instanceof TextContent ) ) {
*
* @param $otext String: old text, must be already segmented
* @param $ntext String: new text, must be already segmented
- * @deprecated since 1.WD, use generateContentDiffBody() instead!
+ * @deprecated since 1.21, use generateContentDiffBody() instead!
*/
function generateDiffBody( $otext, $ntext ) {
- wfDeprecated( __METHOD__, "1.WD" );
+ wfDeprecated( __METHOD__, "1.21" );
return $this->generateTextDiffBody( $otext, $ntext );
}
/**
* Use specified text instead of loading from the database
- * @deprecated since 1.WD, use setContent() instead.
+ * @deprecated since 1.21, use setContent() instead.
*/
function setText( $oldText, $newText ) {
- wfDeprecated( __METHOD__, "1.WD" );
+ wfDeprecated( __METHOD__, "1.21" );
$oldContent = ContentHandler::makeContent( $oldText, $this->getTitle() );
$newContent = ContentHandler::makeContent( $newText, $this->getTitle() );
/**
* Use specified text instead of loading from the database
- * @since 1.WD
+ * @since 1.21
*/
function setContent( Content $oldContent, Content $newContent ) {
$this->mOldContent = $oldContent;
// 1.20
array( 'addTable', 'config', 'patch-config.sql' ),
- // 1.WD
+ // 1.21
array( 'addField', 'revision', 'rev_content_format', 'patch-revision-rev_content_format.sql' ),
array( 'addField', 'revision', 'rev_content_model', 'patch-revision-rev_content_model.sql' ),
array( 'addField', 'archive', 'ar_content_format', 'patch-archive-ar_content_format.sql' ),
array( 'addIndex', 'ipblocks', 'ipb_parent_block_id', 'patch-ipb-parent-block-id-index.sql' ),
array( 'dropField', 'category', 'cat_hidden', 'patch-cat_hidden.sql' ),
- // 1.WD
+ // 1.21
array( 'addField', 'revision', 'rev_content_format', 'patch-revision-rev_content_format.sql' ),
array( 'addField', 'revision', 'rev_content_model', 'patch-revision-rev_content_model.sql' ),
array( 'addField', 'archive', 'ar_content_format', 'patch-archive-ar_content_format.sql' ),
array( 'addIndex', 'ipblocks', 'i05', 'patch-ipblocks_i05_index.sql' ),
array( 'addIndex', 'revision', 'i05', 'patch-revision_i05_index.sql' ),
- //1.WD
+ //1.21
array( 'addField', 'revision', 'rev_content_format', 'patch-revision-rev_content_format.sql' ),
array( 'addField', 'revision', 'rev_content_model', 'patch-revision-rev_content_model.sql' ),
array( 'addField', 'archive', 'ar_content_format', 'patch-archive-ar_content_format.sql' ),
array( 'addIndex', 'ipblocks', 'ipb_parent_block_id', 'patch-ipb-parent-block-id-index.sql' ),
array( 'dropField', 'category', 'cat_hidden', 'patch-cat_hidden.sql' ),
- // 1.WD
+ // 1.21
array( 'addField', 'revision', 'rev_content_format', 'patch-revision-rev_content_format.sql' ),
array( 'addField', 'revision', 'rev_content_model', 'patch-revision-rev_content_model.sql' ),
array( 'addField', 'archive', 'ar_content_format', 'patch-archive-ar_content_format.sql' ),